@extends('admin::index')
@section('content')
 <section class="content-header">
        <h1>
            {{ $create_header or trans('admin.title') }}
            <small>{{ $create_description or trans('admin.description') }}</small>
        </h1>

    </section>

    <section class="content">
        {{-- tian add flash --}}
        @include('flash::message')

        @include('admin::partials.error')
        @include('admin::partials.success')
        @include('admin::partials.exception')
        @include('admin::partials.toastr')

        <div class="box box-info">
            <div class="box-header with-border">
                <h3 class="box-title">添加数据</h3>
                <div class="box-tools">
                    <div class="btn-group pull-right" style="margin-right: 10px">
                        <a href="{{ route('application.column_recommends.index') }}" class="btn btn-sm btn-default"><i class="fa fa-list"></i>&nbsp;列表</a>
                    </div> <div class="btn-group pull-right" style="margin-right: 10px">
                        <a class="btn btn-sm btn-default form-history-back" href="javascript:window.history.go(-1);"><i class="fa fa-arrow-left"></i>&nbsp;返回</a>
                    </div>
                </div>
            </div>
			<!-- form start -->
			<form action="" method="post" accept-charset="UTF-8" class="form-horizontal" pjax-container="">
				<!-- box-body start -->
				<div class="box-body">
					<div class="nav-tabs-custom">
	                    <ul class="nav nav-tabs">
	                        <li class="active">
	                            <a href="#tab_1" data-toggle="tab">基础信息</a>
	                        </li>
	                        <li>
	                            <a href="#tab_2" data-toggle="tab">推荐数据</a>
	                        </li>
	                    </ul>
	                 	<div class="tab-content">
							<!-- tab1 -->
	                        <div class="tab-pane active" id="tab_1">
                                <!-- 名称 -->
                                <div class="form-group">
                                    <label for="name" class="col-sm-2 control-label">名称</label>
                                    <div class="col-sm-8">
                                        <div class="input-group">
                                            <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                            <input type="text" id="name" name="name" value="" class="form-control name" placeholder="输入名称">
                                        </div>
                                    </div>
                                </div>
								<!-- 显示名称 -->
                                <div class="form-group">
                                    <label for="title" class="col-sm-2 control-label">显示名称</label>
                                    <div class="col-sm-8">
                                        <div class="input-group">
                                            <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                            <input type="text" id="title" name="title" value="" class="form-control title" placeholder="输入显示名称">
                                        </div>
                                    </div>
                                </div>
								<!-- 选择一级栏目 -->
								<div class="form-group">
								    <label for="column_id" class="col-sm-2 control-label">选择一级栏目</label>
								    <div class="col-sm-8">
								        <select class="form-control" style="width: 100%;" name="column_id" id="column_id">
								            @foreach($columns as $key => $value)
								                <option name="administrators[]" value="{{ $key }}">{{ $value }}</option>
								            @endforeach
								        </select>
								    </div>
								</div>
                                <!-- y轴坐标 -->
                                <div class="form-group">
                                    <label for="y_coordinate" class="col-sm-2 control-label">y轴坐标</label>
                                    <div class="col-sm-8">
                                        <div class="input-group">
                                            <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                            <input type="text" id="title" name="title" value="" class="form-control title" placeholder="输入y轴坐标">
                                        </div>
                                    </div>
                                </div>
                                <!-- x轴坐标 -->
                                <div class="form-group">
                                    <label for="x_coordinate" class="col-sm-2 control-label">x轴坐标</label>
                                    <div class="col-sm-8">
                                        <div class="input-group">
                                            <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                            <input type="text" id="x_coordinate" name="x_coordinate" value="" class="form-control x_coordinate" placeholder="输入x轴坐标">
                                        </div>
                                    </div>
                                </div>
		                 	</div>
		                 	<!-- tab2 -->
		                 	<div class="tab-pane" id="tab_2">
		                 		<div class="form-group  ">

								<label for="data_id" class="col-sm-2 control-label">选择模板或数据</label>
								    <div class="col-sm-8">
								        <select class="form-control layoutarea data_id select2-hidden-accessible" style="width: 100%;" name="layoutarea[new_1][data_id]" tabindex="-1" aria-hidden="true">
								                                    <option>选择</option><option value="1">点播栏目列表</option><option value="2">直播栏目列表</option><option value="3">回看栏目列表</option><option value="4">首页栏目列表</option><option value="5">111</option></select><span class="select2 select2-container select2-container--default select2-container--below" dir="ltr" style="width: 100%;"><span class="selection"><span class="select2-selection select2-selection--single" role="combobox" aria-haspopup="true" aria-expanded="false" tabindex="0" aria-labelledby="select2-layoutareanew_1data_id-do-container"><span class="select2-selection__rendered" id="select2-layoutareanew_1data_id-do-container" title="选择">选择</span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span></span></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>
								    </div>
								</div>
								<h3>添加推荐位数据</h3>
                                 <!-- 自定义推荐数据 -->
                                <div>
                                	<table class="table table-bordered" id="createColumnRecommendTable">
									  <thead>
									    <tr>
									      <th>选择数据类型</th>
									      <th>资源</th>
									      <th>排序</th>
									      <th>交互onclick事件</th>
									      <th>图片</th>
									      <th>操作</th>
									    </tr>
									  </thead>
									  <tbody>
									  </tbody>
									</table>
									<button onclick="_addColumnRecommendRow({{$datas}});" type="button" class="btn btn-primary">添加行</button>
                                </div>
                            </div>
	                </div>
            	</div>
				<!-- box-body end -->
			</form>
			<!-- form end -->
			<!-- model -->
        </div>
    </section>

    <script type="text/javascript">
        $(function () {
        	
        });
    </script>
@endsection
